﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Runtime.Serialization;
using System.Xml;

namespace EnterpriseServices.DTO
{
    [DataContract()]
    public class ApplicationCollection
    {
        [DataMember()]
        public List<Application> Applications { get; set; }
    }   
    [DataContract()]
    public class RoleCollection
    {
        [DataMember()]
        public List<Role> Roles { get; set; }
    }

    [DataContract()]
    public class UserCollection
    {
        [DataMember()]
        public List<User> Users { get; set; }
    }

    [DataContract()]
    public class Application
    {
        [DataMember()]
        public string Name { get; set; }
        [DataMember()]
        public string Description { get; set; }
        [DataMember()]
        public List<Role> Roles { get; set; }
    }

    [DataContract()]
    public class User
    {
        public User(string userName, Boolean isADDeployed)
        {
            UserName = userName;
            IsADDeployed = isADDeployed;
        }
        [DataMember()]
        public string UserName { get; set; }
        [DataMember()]
        public Boolean IsADDeployed { get; set; }
    }
    [DataContract()]
     public class Role
    {
        [DataMember()]
        public string Name { get; set; }
        [DataMember()]
        public string Description { get; set; }
        [DataMember()]
        public List<User> Users { get; set; }
    }
    [DataContract()]
    public class Group
    {
        [DataMember()]
        public string Name { get; set; }
        [DataMember()]
        public int Level { get; set; }
        [DataMember()]
        public string Type { get; set; }
        [DataMember()]
        public string State { get; set; }
        [DataMember()]
        public string Expiration { get; set; }
        [DataMember()]
        public Boolean IsADDeployed { get; set; }
        [DataMember()]
        public List<User> Users { get; set; }
    }
}
